#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
    """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'firstDemo.settings')
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    # sys.argv---->  ['manage.py', 'runserver', '0.0.0.0:8999']
    main()


# {
#     'missing_args_message': None,
#     'called_from_command_line': None,
#     'description': None,
#     'argument_default': None,
#     'prefix_chars': '-',
#     'conflict_handler': 'error',
#     '_registries': {
#         'action': {
#             None: < class 'argparse._StoreAction' > ,
#             'store': < class 'argparse._StoreAction' > ,
#             'store_const': < class 'argparse._StoreConstAction' > ,
#             'store_true': < class 'argparse._StoreTrueAction' > ,
#             'store_false': < class 'argparse._StoreFalseAction' > ,
#             'append': < class 'argparse._AppendAction' > ,
#             'append_const': < class 'argparse._AppendConstAction' > ,
#             'count': < class 'argparse._CountAction' > ,
#             'help': < class 'argparse._HelpAction' > ,
#             'version': < class 'argparse._VersionAction' > ,
#             'parsers': < class 'argparse._SubParsersAction' > ,
#             'extend': < class 'argparse._ExtendAction' >
#         },
#         'type': {
#             None: < function ArgumentParser.__init__. < locals > .identity at 0x7bbe81d98360 >
#         }
#     },
#     '_actions': [],
#     '_option_string_actions': {},
#     '_action_groups': [ < argparse._ArgumentGroup object at 0x7bbe81029400 > , < argparse._ArgumentGroup object at 0x7bbe81c59e50 > ],
#     '_mutually_exclusive_groups': [],
#     '_defaults': {},
#     '_negative_number_matcher': re.compile('^-\\d+$|^-\\d*\\.\\d+$'),
#     '_has_negative_number_optionals': [],
#     'prog': 'manage.py',
#     'usage': '%(prog)s subcommand [options] [args]',
#     'epilog': None,
#     'formatter_class': < class 'argparse.HelpFormatter' > ,
#     'fromfile_prefix_chars': None,
#     'add_help': False,
#     'allow_abbrev': False,
#     'exit_on_error': True,
#     '_positionals': < argparse._ArgumentGroup object at 0x7bbe81029400 > ,
#     '_optionals': < argparse._ArgumentGroup object at 0x7bbe81c59e50 > ,
#     '_subparsers': None
# }